Skip to content

Add Stata (.dta) file format support#760

Draft
PavelMakarchuk wants to merge 1 commit intomainfrom
add-stata-support
Draft

Add Stata (.dta) file format support#760
PavelMakarchuk wants to merge 1 commit intomainfrom
add-stata-support

Conversation

@PavelMakarchuk
Copy link
Collaborator

Summary

  • Adds support for Stata .dta files as input/output across all CLI subcommands
  • Auto-detects format by file extension (.dta → Stata, everything else → CSV)
  • stdin/stdout default mode remains CSV-only (Stata is binary)
  • New core/io.py module with read_input() / write_output() helpers

Test plan

  • Unit tests for read/write/roundtrip in tests/test_stata_io.py (6 tests, all passing)
  • Manual test with a real Stata dataset from the client

Closes #758

🤖 Generated with Claude Code

Auto-detects format by file extension. Introduces a thin I/O helper
(core/io.py) that dispatches to pd.read_stata/to_stata for .dta files
and falls back to CSV for everything else. The stdin/stdout default
mode remains CSV-only since Stata is a binary format.

Closes #758

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-taxsim Ready Ready Preview, Comment Mar 10, 2026 0:13am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for stata datasets instead of csvs

1 participant